<template>
	<view class="page">
		<view
			class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex logOutReason_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-stretch justify-between logOutReason_fd0_0'>
				<view class='flex flex-wrap align-center logOutReason_fd0_0_c0' @tap.stop="handleJumpDiy"
					data-type="back" data-url="1">
					<image class='logOutReason_fd0_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"56.png"'></image>
				</view>
				<view class='flex flex-wrap align-center'>
					<text class='logOutReason_fd0_0_c1_c0'>注销账号</text>
				</view>
				<view class='flex align-center justify-end logOutReason_fd0_0_c2'>
				</view>
			</view>
		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<!---注销账号原因-带图flex布局开始-->
		<view class="flex flex-direction flex-wrap align-stretch logOutReason_flex_1">
			<view class='flex flex-wrap align-center logOutReason_fd1_0'>
				<text class='logOutReason_fd1_0_c0'>账号注销</text>
			</view>
			<text class='logOutReason_fd1_1'>永久注销且无法恢复，请谨慎操作</text>
			<view class='flex flex-wrap align-center logOutReason_fd1_2'>
				<text class='logOutReason_fd1_2_c0'>请选择注销账号的原因：</text>
			</view>
			<view class='flex flex-direction flex-wrap align-stretch'>
				<benben-select-diy ref="showSelectPopup1661340912869"
					class-name='flex flex-direction align-stretch flex' :items.sync="changeType" v-model="changeId"
					default-type="aid" default-label="name" :allow-cancel='false' type="radio" :disabled='false' @change="change">
					<template v-for='(item,key0) in changeType'>
						<view v-if="item.isSelected"
							class='flex align-center justify-between flex logOutReason_fd1_3_c0_c0' :key="key0"
							@tap="$refs.showSelectPopup1661340912869.tapHandle(key0)">
							<text class='logOutReason_fd1_3_c0_c0_c0'>{{item.name}}</text>
							<image class='logOutReason_fd1_3_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"7.png"'>
							</image>
						</view>
						<view v-else class='flex align-center justify-between flex logOutReason_fd1_3_c0_c1' :key="key0"
							@tap="$refs.showSelectPopup1661340912869.tapHandle(key0)">
							<text class='logOutReason_fd1_3_c0_c1_c0'>{{item.name}}</text>
							<image class='logOutReason_fd1_3_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"8.png"'>
							</image>
						</view>
					</template>
				</benben-select-diy>
			</view>
			<template v-if="changeId == 3">
				<text class='logOutReason_fd1_4'>请填写注销原因</text>
				<view class='flex flex-wrap logOutReason_fd1_5'>
					<textarea class='flex logOutReason_input_fd1_5' confirm-type="done" :placeholder="'请输入~'"
						:maxlength="240" placeholder-style="color:rgba(191, 191, 191, 1);font-size:28rpx" v-model="fd1_5" />
				
				</view>
			</template>
			
		</view>
		<!---注销账号原因-带图flex布局结束-->
		<view class="flex flex-wrap align-center justify-center benben-position-layout flex logOutReason_flex_2">
			<button class='flex-sub logOutReason_fd2_0' @tap.stop="getNext">下一步</button>

		</view>
		<view :style="{height: '88rpx'}"></view>

	</view>
</template>
<script>
	export default {
		components: {},

		data() {
			return {
				"fd1_5": "",
				"changeType": [],
				"changeId": "1",
				"changeName": ''
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			this.get_feedback_type();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			/**
			 * @description 获取注销原因数据
			 */
			get_feedback_type() {
				let that = this;
				this.$api.post(global.apiUrls.post61e53ff1f2406)
					.then(res => {
						// console.log(res);
						if (res.data.code == 1) {
							let result = res.data.data;
							that.changeType = result; //获取反馈类型数据
							this.changeId = this.changeType[0].aid;
							this.changeName = this.changeType[0].name;
							// that.active = result.types[0] && result.types[0].id; //默认选中第一个反馈类型
						}
					})
					.catch(err => {
						console.log(err);
					});
			},
			change(e) {
				this.changeId = e.label;
				this.changeName = e.value;
			},
			getNext() {
				let reason = "";
				if (this.changeId == 3) {
					if (!this.fd1_5) {
						this.$message.info('请填写注销原因');
						return;
					}
					reason = this.fd1_5;
				} else {
					reason = this.changeName;
				}
				uni.redirectTo({
					url: '/pages/my/logOutRisk/logOutRisk?reason=' + reason
				})
			}
		}
	};
</script>
<style lang="scss" scoped>
	.logOutReason_fd2_0 {
		background: #2c8fff;
		background-size: 100% !important;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: #fff;
		margin: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
		line-height: 88rpx;
		width: 686rpx;
	}

	.logOutReason_flex_2 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(64rpx + var(--window-bottom));
	}

	.logOutReason_fd1_0 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.logOutReason_fd1_0_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: #333333;
	}

	.logOutReason_fd1_1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
	}

	.logOutReason_fd1_2 {
		padding: 56rpx 0rpx 8rpx 0rpx;
	}

	.logOutReason_fd1_2_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: #333333;
	}

	.logOutReason_fd1_3_c0_c0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.logOutReason_fd1_3_c0_c0_c0 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
	}

	.logOutReason_fd1_3_c0_c0_c1 {
		width: 32rpx;
		height: 32rpx;
	}

	.logOutReason_fd1_3_c0_c1 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.logOutReason_fd1_3_c0_c1_c0 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
	}

	.logOutReason_fd1_3_c0_c1_c1 {
		width: 32rpx;
		height: 32rpx;
	}

	.logOutReason_fd1_4 {
		font-size: 28rpx;
		font-weight: 400;
		color: #FF6969;
		margin: 32rpx 0rpx 25rpx 0rpx;
	}

	.logOutReason_fd1_5 {
		background: #F6F6F6;
		background-size: 100% !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 20rpx 20rpx 20rpx 20rpx;
	}

	.logOutReason_input_fd1_5 {
		width: 100%;
		height: 178rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
	}

	.logOutReason_flex_1 {
		background: #fff;
		background-size: 100% !important;
		font-size: 32rpx;
		background-size: 100% auto !important;
		padding: 32rpx 32rpx 32rpx 32rpx;
	}

	.logOutReason_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.logOutReason_fd0_0_c0 {
		width: 100rpx;
	}

	.logOutReason_fd0_0_c0_c0 {
		width: 20rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.logOutReason_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
		line-height: 50rpx;
	}

	.logOutReason_fd0_0_c2 {
		padding: 0rpx 0rpx 0rpx 0rpx;
		width: 100rpx;
	}

	.logOutReason_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		background-size: 100% !important;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.page {
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto !important;
	}
</style>
